package leetcodecompetition.D337;

import org.junit.jupiter.api.Test;
import tool.s;

public class T6319 {
    public int[] evenOddBit(int n) {
        int[] ints = new int[2];
        int i = 0;
        while (true) {
            if ((n>>i)==0)break;
            if (((n >> i) & 1) == 1){
                ints[i%2]++;
            }

            i++;
        }
        return ints;
    }
    @Test
    public void test() {
        s.print(evenOddBit(2));
    }
}
